<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <!-- 早期版本IE浏览器 -->
    <div id="t">test</div>
    <script>
        var obj = document.getElementById('t');
        // 添加第1个事件处理程序
        obj.attachEvent('onclick', function () {
            console.log('one');
        });
        // 添加第2个事件处理程序
        obj.attachEvent('onclick', function () {
            console.log('two');
        });
    </script>

    <!-- 标准浏览器 -->
    <div id="t">test</div>
    <script>
        var obj = document.getElementById('t');
        // 添加第1个事件处理程序
        obj.addEventListener('click', function () {
            console.log('one');
        });
        // 添加第2个事件处理程序
        obj.addEventListener('click', function () {
            console.log('two');
        });
    </script>
</body>

</html>